#ifndef BIT_EXTRACTOR_H_INCLUDED
#define BIT_EXTRACTOR_H_INCLUDED

#include "constants.h"

inline unsigned char bit(size_t v, size_t bit)
{
    return (unsigned char)((v & (1 << bit)) != 0)
        + ((unsigned char)((v & (1 << (bit + n))) != 0) << 1);
}

#endif//BIT_EXTRACTOR_H_INCLUDED
